package com.eclipse.org.snms.summary;

/**
 * Class used as a trivial case of a Task 
 * Serves as the business object for the TableViewer Example.
 * 
 * A Task has the following properties: completed, description,
 * owner and percentComplete 
 * 
 * @author Mohamad
 *
 * 
 */
public class ExampleTask {

	private boolean completed 	= false;
	private String description 	= "";
	private String title 		= "?";
	private String date			= "March 20th";
	private int priority = 0;  
	

	/**
	 * Create a task with an initial description
	 * 
	 * @param string
	 */
	public ExampleTask(String string) {
		
		super();
		setDescription(string);
	}

	/**
	 * @return true if completed, false otherwise
	 */
	public boolean passedDeadline() {
		return completed;
	}

	/**
	 * @return String task description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return String task owner
	 */
	public String getTitle() {
		return title;
	}
	
	/**
	 * @return String task owner
	 */
	public String getDate() {
		return date;
	}

	/**
	 * @return int percent completed
	 * 
	 */
	public int getPriority() {
		return priority;
	}

	/**
	 * Set the 'completed' property
	 * 
	 * @param b
	 */
	public void setCompleted(boolean b) {
		completed = b;
	}

	/**
	 * Set the 'description' property
	 * 
	 * @param string
	 */
	public void setDescription(String string) {
		description = string;
	}

	/**
	 * Set the 'owner' property
	 * 
	 * @param string
	 */
	public void setTitle(String string) {
		title = string;
	}
	
	/**
	 * Set the 'owner' property
	 * 
	 * @param string
	 */
	public void setDate(String string) {
		date = string;
	}
	
	/**
	 * Set the 'percentComplete' property
	 * 
	 * @param i
	 */
	public void setPriority(int i) {
		priority= i;
	}

}
